package com.antaohua.platfrom.system.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.antaohua.platfrom.framework.base.model.BaseModel;

@Entity
@Table(name="SYS_ROLE")
public class SysRoleEntity extends BaseModel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name="ROLE_NAME",length=32,nullable=false)
	private String roleName;

	@Column(name="ROLE_CODE",length=32,nullable=false)
	private String roleCode;

	
	@Column(name="depict",length=1000,nullable=true)
	private String depict;
	
	@Column(name="is_system",nullable=false)
	private Boolean isSystem;
	
	
	@Column(name = "group_id", length = 36, nullable = false,columnDefinition="char(36)")
	private String groupId;
	
	
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "group_id", insertable = false, updatable = false)
	private SysRoleGroupEntity group;
	
	
	
	
	public String getDepict() {
		return depict;
	}

	public void setDepict(String depict) {
		this.depict = depict;
	}

	

	public Boolean getIsSystem() {
		return isSystem;
	}

	public void setIsSystem(Boolean isSystem) {
		this.isSystem = isSystem;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public SysRoleGroupEntity getGroup() {
		return group;
	}

	public void setGroup(SysRoleGroupEntity group) {
		this.group = group;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}



	
	
	
	
}